<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>管理员列表</title>
  <meta name="description" content="用户列表">
  <meta name="keywords" content="table">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="${staticHost }/back/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="${staticHost }/back/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="${staticHost }/back/css/amazeui.min.css"/>
  <link rel="stylesheet" href="${staticHost }/back/css/admin.css">
  <link rel="stylesheet" href="${staticHost }/css/font-awesome.min.css"/>
</head>
<body>
	<!--[if lte IE 9]>
	<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
	  以获得更好的体验！</p>
	<![endif]-->
	<c:import url="../commons/header.jsp" />
	<div class="am-cf admin-main">
	  <c:import url="/back/menu" />
	  <!-- content start -->
	  <div class="admin-content">
	
	    <div class="am-cf am-padding">
	      <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">系统设置</strong> / <small>角色列表</small></div>
	    </div>
	
	    <div class="am-g">
	      <div class="am-u-sm-12 am-u-md-1">
	        <div class="am-btn-toolbar">
	          <div class="am-btn-group am-btn-group-xs">
	            <a type="button" class="am-btn am-btn-default" href="toSaveRole" ><span class="am-icon-plus"></span> 新增</a>
	          </div>
	        </div>
	      </div>
	    </div>
	
	    <div class="am-g">
	      <div class="am-u-sm-12">
	        <form class="am-form">
	          <table class="am-table am-table-bordered am-table-striped am-table-compact">
	            <thead>
	              <tr>
	                <th class="table-id">编号</th>
	                <th class="table-title">角色名称</th>
	                <th class="table-author am-hide-sm-only">创建者</th>
	                <th class="table-date am-hide-sm-only">创建时间</th>
	                <th class="table-set">操作</th>
	              </tr>
	          </thead>
	          <tbody>
	          	<c:forEach var="role" items="${requestScope.roles }" varStatus="status">
	            <tr>
	          	  <td>${status.index+1 }</td>
	              <td>${role.name }</td>
	              <td>${role.createrName }</td>
	              <td class="am-hide-sm-only"><fmt:formatDate value="${role.createTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
	              <td>
	                <div class="am-btn-toolbar">
	                  <div class="am-btn-group am-btn-group-xs">
	                    <a class="am-btn am-btn-default am-btn-xs am-text-secondary" href="toSaveRole?id=${role.id }"><span class="am-icon-pencil-square-o"></span> 编辑</a>
	                    <a class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only role-delete" data-id="${role.id }"><span class="am-icon-trash-o"></span> 删除</a>
	                  </div>
	                </div>
	              </td>
	            </tr>
	            </c:forEach>
	          </tbody>
	        </table>
	          <%-- <div class="am-cf">
	  			共 ${pageInfo.totalNum } 条记录，${pageInfo.allPage } 页
			    <div class="am-fr">
			      <!-- <ul class="am-pagination"> -->
			      	${requestScope.pagination }
			        <!-- <li class="am-disabled"><a href="#">«</a></li>
			        <li class="am-active"><a href="#">1</a></li>
			        <li><a href="#">2</a></li>
			        <li><a href="#">3</a></li>
			        <li><a href="#">4</a></li>
			        <li><a href="#">5</a></li>
			        <li><a href="#">»</a></li> -->
			     <!--  </ul> -->
			    </div>
			  </div> --%>
	          <!-- <hr />
	          <p>注：.....</p> -->
	        </form>
	      </div>
	
	    </div>
	  </div>
	  <!-- content end -->
	</div>
	
	<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>
	<c:import url="../commons/footer.jsp" />
	<!--[if lt IE 9]>
	<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
	<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
	<script src="${staticHost }/back/js/amazeui.ie8polyfill.min.js"></script>
	<![endif]-->
	
	<!--[if (gte IE 9)|!(IE)]><!-->
	<script src="${staticHost }/back/js/jquery.min.js"></script>
	<!--<![endif]-->
	<script src="${staticHost }/back/js/amazeui.min.js"></script>
	<script src="${staticHost }/back/js/app.js"></script>
	<script src="${staticHost }/back/js/manage/role.js"></script>
</body>
</html>